<html>
<head>
  <title>Cling</title>
  <script data-main="scripts/cling" src="scripts/require.js"></script>
  <link rel="stylesheet" href="style/import.css">
</head>
<body onload="selectMenu('build')">
  <iframe seamless src="header.html" class="header" id="iheader"></iframe>
    <div id="breadcrumb"></div>
    <div id="content">
      <div id="main">
        <!-- insert the page content here -->
        <h1>Build Instructions</h1>
        <p> This page is shows how to download and build the project cling as a standalone C++ interpreter in few steps..</p>
        
        <h3> Build script </h3>

        You can download and run this <a href= "https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh" target="_blank">build script</a>.

        <h3> Building with CMake </h3>
        
        <ul><b>Prerequisites</b>
          <li>See <a href="http://llvm.org/docs/GettingStarted.html#requirements" target="_blank">Getting Started with the LLVM System - Requirements</a>
          </li>
          <li>
            Note also that <a href= "http://www.python.org/download" target = "_blank" >Python</a> is needed for running the test suite.
          </li>
          <br/>
          <b> And extra for Windows</b>
          <li><b>cmake</b> - http://www.cmake.org/cmake/resources/software.html</li>
          <li><b>Python</b> - http://www.python.org/download/</li>
          <li><b>GnuWin32 Tools</b> - http://getgnuwin32.sourceforge.net/</li>
          <li><b>Visual Studio</b> - <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express" target="_blank">VS Express should work as well</a></li>
        </ul>

        <p>Start by checking out llvm, clang and cling: </p>
<pre><code>
git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches

</code></pre>

 <p>
Now follow the procedure described at the <a href = "http://clang.llvm.org/get_started.html" target = "_blank">clang web page</a> for ./configure --enable-cxx11; make- or CMake-based build instructions. 
Don't forget to make install. You will get a binary called cling: that's your interactive C++ interpreter!
</p>

<p> Then use CMake to configure & build cling:  </p>

<pre><code>
mkdir obj
cd obj
cmake -DCMAKE_INSTALL_PREFIX=[Install Path] ..\src
cmake --build . --config [Release/Debug] --target cling

</code></pre>

      </div>
    </div>
  <iframe seamless class="footer" src="footer.html"></iframe>
</body>
</html>
